package cn.edu.hunau.java.week01.day03;

import org.junit.Test;

import java.util.Arrays;
import java.util.Random;


public class ArrayExTest {

        @Test
        public void testRandom(){
            Random r=new Random();
            int[] arr=new int[1];
            for(int i=0;i<arr.length;i++){
                int num=r.nextInt(33)+1;
                arr[i]=num;
            }
            System.out.println(Arrays.toString(arr));
            print(arr);
        }

    public void print(int[] arr){
        for (int i=0;i<arr.length;i++){
            System.out.println(arr[i]+" ");
        }
    }

}